<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArSyncTask Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArSyncTask.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArSyncTask-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArSyncTask Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class used internally to manage the tasks that are called every cycle.  
 <a href="classArSyncTask.html#details">More...</a></p>

<p><code>#include &lt;ArSyncTask.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1ac42758c3182aa1c3e4951f811913fb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a1ac42758c3182aa1c3e4951f811913fb">addNewBranch</a> (const char *nameOfNew, int position, <a class="el" href="classArTaskState.html#a0dd5be44785527104bb2453cef890c32">ArTaskState::State</a> *state=NULL)</td></tr>
<tr class="memdesc:a1ac42758c3182aa1c3e4951f811913fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a new branch to this instance.  <a href="#a1ac42758c3182aa1c3e4951f811913fb">More...</a><br /></td></tr>
<tr class="separator:a1ac42758c3182aa1c3e4951f811913fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40645f3767421a78ac80b3e1ac644b19"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a40645f3767421a78ac80b3e1ac644b19">addNewLeaf</a> (const char *nameOfNew, int position, <a class="el" href="classArFunctor.html">ArFunctor</a> *functor, <a class="el" href="classArTaskState.html#a0dd5be44785527104bb2453cef890c32">ArTaskState::State</a> *state=NULL)</td></tr>
<tr class="memdesc:a40645f3767421a78ac80b3e1ac644b19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a new leaf to this instance.  <a href="#a40645f3767421a78ac80b3e1ac644b19">More...</a><br /></td></tr>
<tr class="separator:a40645f3767421a78ac80b3e1ac644b19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad52ec11e2450833fa079534e2d7de6d9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#ad52ec11e2450833fa079534e2d7de6d9">ArSyncTask</a> (const char *name, <a class="el" href="classArFunctor.html">ArFunctor</a> *functor=NULL, <a class="el" href="classArTaskState.html#a0dd5be44785527104bb2453cef890c32">ArTaskState::State</a> *state=NULL, <a class="el" href="classArSyncTask.html">ArSyncTask</a> *parent=NULL)</td></tr>
<tr class="memdesc:ad52ec11e2450833fa079534e2d7de6d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor, shouldn't ever do a new on anything besides the root node.  <a href="#ad52ec11e2450833fa079534e2d7de6d9">More...</a><br /></td></tr>
<tr class="separator:ad52ec11e2450833fa079534e2d7de6d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e9e77e9393ab5c6e5da84e5660af986"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArSyncTask.html">ArSyncTask</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a0e9e77e9393ab5c6e5da84e5660af986">find</a> (const char *name)</td></tr>
<tr class="memdesc:a0e9e77e9393ab5c6e5da84e5660af986"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the task recursively down the tree by name.  <a href="#a0e9e77e9393ab5c6e5da84e5660af986">More...</a><br /></td></tr>
<tr class="separator:a0e9e77e9393ab5c6e5da84e5660af986"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c589d149563d3b30ba20c20e8ca27fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArSyncTask.html">ArSyncTask</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a1c589d149563d3b30ba20c20e8ca27fc">find</a> (<a class="el" href="classArFunctor.html">ArFunctor</a> *functor)</td></tr>
<tr class="memdesc:a1c589d149563d3b30ba20c20e8ca27fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the task recursively down the tree by functor.  <a href="#a1c589d149563d3b30ba20c20e8ca27fc">More...</a><br /></td></tr>
<tr class="separator:a1c589d149563d3b30ba20c20e8ca27fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab60d5eb41d168bc648d4f5d65a569242"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArSyncTask.html">ArSyncTask</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#ab60d5eb41d168bc648d4f5d65a569242">findNonRecursive</a> (const char *name)</td></tr>
<tr class="memdesc:ab60d5eb41d168bc648d4f5d65a569242"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the task in the instances list of children, by name.  <a href="#ab60d5eb41d168bc648d4f5d65a569242">More...</a><br /></td></tr>
<tr class="separator:ab60d5eb41d168bc648d4f5d65a569242"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a653b9ab67a08f4754ca0e482748f0461"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArSyncTask.html">ArSyncTask</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a653b9ab67a08f4754ca0e482748f0461">findNonRecursive</a> (<a class="el" href="classArFunctor.html">ArFunctor</a> *functor)</td></tr>
<tr class="memdesc:a653b9ab67a08f4754ca0e482748f0461"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the task in the instances list of children, by functor.  <a href="#a653b9ab67a08f4754ca0e482748f0461">More...</a><br /></td></tr>
<tr class="separator:a653b9ab67a08f4754ca0e482748f0461"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2e018da424851e241d14409fab31261"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa2e018da424851e241d14409fab31261"></a>
<a class="el" href="classArFunctor.html">ArFunctor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#aa2e018da424851e241d14409fab31261">getFunctor</a> (void)</td></tr>
<tr class="memdesc:aa2e018da424851e241d14409fab31261"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the functor this instance runs, if there is one. <br /></td></tr>
<tr class="separator:aa2e018da424851e241d14409fab31261"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fd254bc0f505f8ec686f3405b4f491b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0fd254bc0f505f8ec686f3405b4f491b"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a0fd254bc0f505f8ec686f3405b4f491b">getName</a> (void)</td></tr>
<tr class="memdesc:a0fd254bc0f505f8ec686f3405b4f491b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the name of this task. <br /></td></tr>
<tr class="separator:a0fd254bc0f505f8ec686f3405b4f491b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e7b4b5c77bd7b0fbb1f9b8bad59e690"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArRetFunctor.html">ArRetFunctor</a>&lt; bool &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a6e7b4b5c77bd7b0fbb1f9b8bad59e690">getNoTimeWarningCB</a> (void)</td></tr>
<tr class="memdesc:a6e7b4b5c77bd7b0fbb1f9b8bad59e690"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the functor called to check if there should be a time warning this cycle (should only be used from the robot)  <a href="#a6e7b4b5c77bd7b0fbb1f9b8bad59e690">More...</a><br /></td></tr>
<tr class="separator:a6e7b4b5c77bd7b0fbb1f9b8bad59e690"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30484c31720c43b1f0803ed082db1767"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a30484c31720c43b1f0803ed082db1767"></a>
<a class="el" href="classArSyncTask.html">ArSyncTask</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a30484c31720c43b1f0803ed082db1767">getRunning</a> (void)</td></tr>
<tr class="memdesc:a30484c31720c43b1f0803ed082db1767"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns what this is running, if anything (recurses) <br /></td></tr>
<tr class="separator:a30484c31720c43b1f0803ed082db1767"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa54cd161efc0e62df449c7c4fa0b96dd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa54cd161efc0e62df449c7c4fa0b96dd"></a>
<a class="el" href="classArTaskState.html#a0dd5be44785527104bb2453cef890c32">ArTaskState::State</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#aa54cd161efc0e62df449c7c4fa0b96dd">getState</a> (void)</td></tr>
<tr class="memdesc:aa54cd161efc0e62df449c7c4fa0b96dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the state of the task. <br /></td></tr>
<tr class="separator:aa54cd161efc0e62df449c7c4fa0b96dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75e5480c165150c136bb24b0d211ce66"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArRetFunctor.html">ArRetFunctor</a>&lt; unsigned int &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a75e5480c165150c136bb24b0d211ce66">getWarningTimeCB</a> (void)</td></tr>
<tr class="memdesc:a75e5480c165150c136bb24b0d211ce66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the functor called to get the cycle warning time (should only be used from the robot)  <a href="#a75e5480c165150c136bb24b0d211ce66">More...</a><br /></td></tr>
<tr class="separator:a75e5480c165150c136bb24b0d211ce66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4127e046578b3a1c450927a417b8a018"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4127e046578b3a1c450927a417b8a018"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isDeleting</b> (void)</td></tr>
<tr class="separator:a4127e046578b3a1c450927a417b8a018"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7431b54ad496bc36b8b1379a4d9736e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#ad7431b54ad496bc36b8b1379a4d9736e">log</a> (int depth=0)</td></tr>
<tr class="memdesc:ad7431b54ad496bc36b8b1379a4d9736e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints the node, which prints all the children of this node as well.  <a href="#ad7431b54ad496bc36b8b1379a4d9736e">More...</a><br /></td></tr>
<tr class="separator:ad7431b54ad496bc36b8b1379a4d9736e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ecda58ba75b870563d693817733b392"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6ecda58ba75b870563d693817733b392"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>remove</b> (<a class="el" href="classArSyncTask.html">ArSyncTask</a> *proc)</td></tr>
<tr class="separator:a6ecda58ba75b870563d693817733b392"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d3a54585ee343b816167b13dd290d92"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a8d3a54585ee343b816167b13dd290d92">run</a> (void)</td></tr>
<tr class="memdesc:a8d3a54585ee343b816167b13dd290d92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Runs the node, which runs all children of this node as well.  <a href="#a8d3a54585ee343b816167b13dd290d92">More...</a><br /></td></tr>
<tr class="separator:a8d3a54585ee343b816167b13dd290d92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89b8af3a59f6337b0ac35bb0eb7a4984"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a89b8af3a59f6337b0ac35bb0eb7a4984">setNoTimeWarningCB</a> (<a class="el" href="classArRetFunctor.html">ArRetFunctor</a>&lt; bool &gt; *functor)</td></tr>
<tr class="memdesc:a89b8af3a59f6337b0ac35bb0eb7a4984"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the functor called to check if there should be a time warning this cycle (should only be used from the robot)  <a href="#a89b8af3a59f6337b0ac35bb0eb7a4984">More...</a><br /></td></tr>
<tr class="separator:a89b8af3a59f6337b0ac35bb0eb7a4984"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c87d12503033c79957ae83040205855"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7c87d12503033c79957ae83040205855"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a7c87d12503033c79957ae83040205855">setState</a> (<a class="el" href="classArTaskState.html#a0dd5be44785527104bb2453cef890c32">ArTaskState::State</a> state)</td></tr>
<tr class="memdesc:a7c87d12503033c79957ae83040205855"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the state of the task. <br /></td></tr>
<tr class="separator:a7c87d12503033c79957ae83040205855"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa612ab734d748e9dc08f05625c60877"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#afa612ab734d748e9dc08f05625c60877">setWarningTimeCB</a> (<a class="el" href="classArRetFunctor.html">ArRetFunctor</a>&lt; unsigned int &gt; *functor)</td></tr>
<tr class="memdesc:afa612ab734d748e9dc08f05625c60877"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the functor called to get the cycle warning time (should only be used from the robot)  <a href="#afa612ab734d748e9dc08f05625c60877">More...</a><br /></td></tr>
<tr class="separator:afa612ab734d748e9dc08f05625c60877"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1327f8bea0fd8910fa89ed718849e373"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSyncTask.html#a1327f8bea0fd8910fa89ed718849e373">~ArSyncTask</a> ()</td></tr>
<tr class="memdesc:a1327f8bea0fd8910fa89ed718849e373"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a1327f8bea0fd8910fa89ed718849e373">More...</a><br /></td></tr>
<tr class="separator:a1327f8bea0fd8910fa89ed718849e373"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ab51472540d69ad815ec714bc67864e50"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab51472540d69ad815ec714bc67864e50"></a>
<a class="el" href="classArFunctor.html">ArFunctor</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myFunctor</b></td></tr>
<tr class="separator:ab51472540d69ad815ec714bc67864e50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedf8dd6bd0987131da3574e66ee2e3fb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aedf8dd6bd0987131da3574e66ee2e3fb"></a>
<a class="el" href="classArSyncTask.html">ArSyncTask</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myInvokingOtherFunctor</b></td></tr>
<tr class="separator:aedf8dd6bd0987131da3574e66ee2e3fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0d369326ba6d67a55833c2567b48f91"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac0d369326ba6d67a55833c2567b48f91"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myIsDeleting</b></td></tr>
<tr class="separator:ac0d369326ba6d67a55833c2567b48f91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad991491d3d9d6599d73242f4e46816a5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad991491d3d9d6599d73242f4e46816a5"></a>
std::multimap&lt; int, <a class="el" href="classArSyncTask.html">ArSyncTask</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myMultiMap</b></td></tr>
<tr class="separator:ad991491d3d9d6599d73242f4e46816a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaabaf0f92c0e1aacdd284742fb6f0601"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaabaf0f92c0e1aacdd284742fb6f0601"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myName</b></td></tr>
<tr class="separator:aaabaf0f92c0e1aacdd284742fb6f0601"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2887e3b4a8895ca23d80fcd6d70ba805"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2887e3b4a8895ca23d80fcd6d70ba805"></a>
<a class="el" href="classArRetFunctor.html">ArRetFunctor</a>&lt; bool &gt; *&#160;</td><td class="memItemRight" valign="bottom"><b>myNoTimeWarningCB</b></td></tr>
<tr class="separator:a2887e3b4a8895ca23d80fcd6d70ba805"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf543283c3d6c9c0e0320f01a2979cd1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abf543283c3d6c9c0e0320f01a2979cd1"></a>
<a class="el" href="classArSyncTask.html">ArSyncTask</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myParent</b></td></tr>
<tr class="separator:abf543283c3d6c9c0e0320f01a2979cd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45a51e951574ac14ab43cc8125e18e23"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45a51e951574ac14ab43cc8125e18e23"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myRunning</b></td></tr>
<tr class="separator:a45a51e951574ac14ab43cc8125e18e23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff860f5cec1e7ccd8a511d914877f553"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aff860f5cec1e7ccd8a511d914877f553"></a>
<a class="el" href="classArTaskState.html#a0dd5be44785527104bb2453cef890c32">ArTaskState::State</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myState</b></td></tr>
<tr class="separator:aff860f5cec1e7ccd8a511d914877f553"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcd0b09c9b1cfbef5a4c816f9c23cc86"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adcd0b09c9b1cfbef5a4c816f9c23cc86"></a>
<a class="el" href="classArTaskState.html#a0dd5be44785527104bb2453cef890c32">ArTaskState::State</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myStatePointer</b></td></tr>
<tr class="separator:adcd0b09c9b1cfbef5a4c816f9c23cc86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20deb2075941d65e05b3532dd1723a84"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a20deb2075941d65e05b3532dd1723a84"></a>
<a class="el" href="classArRetFunctor.html">ArRetFunctor</a>&lt; unsigned int &gt; *&#160;</td><td class="memItemRight" valign="bottom"><b>myWarningTimeCB</b></td></tr>
<tr class="separator:a20deb2075941d65e05b3532dd1723a84"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class used internally to manage the tasks that are called every cycle. </p>
<p>This is used internally, no user should normally have to create one, but serious developers may want to use the members. Most users will be able to add user tasks via the <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> class.</p>
<p>The way it works is that each instance is a node in a tree. The only node that should ever be created with a new is the top one. The run and print functions both call the run/print on themselves, then on all of their children, going from lowest numbered position to highest numbered, lower going first. There are no hard limits to the position, it can be any integer. ARIA uses the convention of 0 to 100, when you add things of your own you should leave room to add in between. Also you can add things with the same position, the only effect this has is that the first addition will show up first in the run or print.</p>
<p>After the top one is created, every other task should be created with either <a class="el" href="classArSyncTask.html#a1ac42758c3182aa1c3e4951f811913fb" title="Adds a new branch to this instance. ">addNewBranch()</a> or <a class="el" href="classArSyncTask.html#a40645f3767421a78ac80b3e1ac644b19" title="Adds a new leaf to this instance. ">addNewLeaf()</a>. Each node can either be a branch node or a list node. The list (a multimap) of branches/nodes is ordered by the position passed in to the add function. <a class="el" href="classArSyncTask.html#a1ac42758c3182aa1c3e4951f811913fb" title="Adds a new branch to this instance. ">addNewBranch()</a> adds a new branch node to the instance it is called on, with the given name and position. <a class="el" href="classArSyncTask.html#a40645f3767421a78ac80b3e1ac644b19" title="Adds a new leaf to this instance. ">addNewLeaf()</a> adds a new leaf node to the instance it is called on, with the given name and position, and also with the <a class="el" href="classArFunctor.html" title="An object which allows storing a generalized reference to a method with an object instance to call la...">ArFunctor</a> given, this functor will be called when the leaf is run. Either add creates the new instance and puts it in the list of branches/nodes in the approriate spot.</p>
<p>The tree takes care of all of its own memory management and list management, the "add" functions put into the list and creates the memory, conversely if you delete an <a class="el" href="classArSyncTask.html" title="Class used internally to manage the tasks that are called every cycle. ">ArSyncTask</a> (which is the correct way to get rid of one) it will remove itself from its parents list.</p>
<p>If you want to add something to the tree the proper way to do it is to get the pointer to the root of the tree (ie with ArRobot::getSyncProcRoot) and then to use find on the root to find the branch you want to travel down, then continue this until you find the node you want to add to. Once there just call addNewBranch or addNewLeaf and you're done.</p>
<p>The state of a task can be stored in the target of a given <a class="el" href="classArTaskState.html#a0dd5be44785527104bb2453cef890c32">ArTaskState::State</a> pointer, or if NULL than <a class="el" href="classArSyncTask.html" title="Class used internally to manage the tasks that are called every cycle. ">ArSyncTask</a> will use its own member variable. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ad52ec11e2450833fa079534e2d7de6d9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArSyncTask::ArSyncTask </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArFunctor.html">ArFunctor</a> *&#160;</td>
          <td class="paramname"><em>functor</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArTaskState.html#a0dd5be44785527104bb2453cef890c32">ArTaskState::State</a> *&#160;</td>
          <td class="paramname"><em>state</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArSyncTask.html">ArSyncTask</a> *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor, shouldn't ever do a new on anything besides the root node. </p>
<p>New should never be called to create an <a class="el" href="classArSyncTask.html" title="Class used internally to manage the tasks that are called every cycle. ">ArSyncTask</a> except to create the root node.</p>
<p>Read the detailed documentation of the class for details. </p>

</div>
</div>
<a class="anchor" id="a1327f8bea0fd8910fa89ed718849e373"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ArSyncTask::~ArSyncTask </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>
<p>If you delete the task it deletes everything in its list, so to delete the whole tree just delete the top one...</p>
<p>also note that if you delete a node, it will remove itself from its parents list. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a1ac42758c3182aa1c3e4951f811913fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArSyncTask::addNewBranch </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>nameOfNew</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArTaskState.html#a0dd5be44785527104bb2453cef890c32">ArTaskState::State</a> *&#160;</td>
          <td class="paramname"><em>state</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds a new branch to this instance. </p>
<p>Creates a new task with the given name and puts the task into its own iternal list at the given position.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nameOfNew</td><td>Name to give to the new task. </td></tr>
    <tr><td class="paramname">position</td><td>place in list to put the branch, things are run/printed in the order of highest number to lowest number, no limit on numbers (other than that it is an int). ARIA uses 0 to 100 just as a convention. </td></tr>
    <tr><td class="paramname">state</td><td>Pointer to external variable to store task state in, or NULL to use a new internal variable instead. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a40645f3767421a78ac80b3e1ac644b19"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArSyncTask::addNewLeaf </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>nameOfNew</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArFunctor.html">ArFunctor</a> *&#160;</td>
          <td class="paramname"><em>functor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArTaskState.html#a0dd5be44785527104bb2453cef890c32">ArTaskState::State</a> *&#160;</td>
          <td class="paramname"><em>state</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds a new leaf to this instance. </p>
<p>Creates a new task with the given name and puts the task into its own iternal list at the given position.</p>
<p>Sets the nodes functor so that it will call the functor when run is called. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nameOfNew</td><td>Name to give to the new task. </td></tr>
    <tr><td class="paramname">position</td><td>place in list to put the branch, things are run/printed in the order of highest number to lowest number, no limit on numbers (other than that it is an int). ARIA uses 0 to 100 just as a convention. </td></tr>
    <tr><td class="paramname">functor</td><td><a class="el" href="classArFunctor.html" title="An object which allows storing a generalized reference to a method with an object instance to call la...">ArFunctor</a> which contains the functor to invoke when run is called. </td></tr>
    <tr><td class="paramname">state</td><td>Pointer to external variable to store task state in, or NULL to use an internal variable instead. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0e9e77e9393ab5c6e5da84e5660af986"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArSyncTask.html">ArSyncTask</a> * ArSyncTask::find </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds the task recursively down the tree by name. </p>
<p>Finds a node below (or at) this level in the tree with the given name.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the child we are interested in finding </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The task, if found. If not found, NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="a1c589d149563d3b30ba20c20e8ca27fc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArSyncTask.html">ArSyncTask</a> * ArSyncTask::find </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArFunctor.html">ArFunctor</a> *&#160;</td>
          <td class="paramname"><em>functor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds the task recursively down the tree by functor. </p>
<p>Finds a node below (or at) this level in the tree with the given functor.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">functor</td><td>The task functor pointer to search for. Must not be NULL. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The task, if found. If not found, NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="ab60d5eb41d168bc648d4f5d65a569242"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArSyncTask.html">ArSyncTask</a> * ArSyncTask::findNonRecursive </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds the task in the instances list of children, by name. </p>
<p>Finds a child of this node with the given name.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the child we are interested in finding </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The task, if found. If not found, NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="a653b9ab67a08f4754ca0e482748f0461"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArSyncTask.html">ArSyncTask</a> * ArSyncTask::findNonRecursive </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArFunctor.html">ArFunctor</a> *&#160;</td>
          <td class="paramname"><em>functor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds the task in the instances list of children, by functor. </p>
<p>Finds a child of this node with the given functor.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">functor</td><td>the functor we are interested in finding </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The task, if found. If not found, NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="a6e7b4b5c77bd7b0fbb1f9b8bad59e690"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArRetFunctor.html">ArRetFunctor</a>&lt; bool &gt; * ArSyncTask::getNoTimeWarningCB </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the functor called to check if there should be a time warning this cycle (should only be used from the robot) </p>
<p>This sets a functor which will be called to see if we should warn this time through or not. </p>

</div>
</div>
<a class="anchor" id="a75e5480c165150c136bb24b0d211ce66"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArRetFunctor.html">ArRetFunctor</a>&lt; unsigned int &gt; * ArSyncTask::getWarningTimeCB </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the functor called to get the cycle warning time (should only be used from the robot) </p>
<p>This gets a functor which will be called to find the time on the task such that if it takes longer than this number of ms to run a warning message will be issued, sets this on the children too. </p>

</div>
</div>
<a class="anchor" id="ad7431b54ad496bc36b8b1379a4d9736e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArSyncTask::log </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>depth</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Prints the node, which prints all the children of this node as well. </p>
<p>Prints the node...</p>
<p>the defaulted depth parameter controls how far over to print the data (how many tabs)... it recurses down all its children. </p>

</div>
</div>
<a class="anchor" id="a8d3a54585ee343b816167b13dd290d92"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArSyncTask::run </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Runs the node, which runs all children of this node as well. </p>
<p>If this node is a leaf it calls the functor for the node, if it is a branch it goes through all of the children in the order of highest position to lowest position and calls run on them. </p>

</div>
</div>
<a class="anchor" id="a89b8af3a59f6337b0ac35bb0eb7a4984"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArSyncTask::setNoTimeWarningCB </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArRetFunctor.html">ArRetFunctor</a>&lt; bool &gt; *&#160;</td>
          <td class="paramname"><em>functor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the functor called to check if there should be a time warning this cycle (should only be used from the robot) </p>
<p>This sets a functor which will be called to see if we should warn this time through or not. </p>

</div>
</div>
<a class="anchor" id="afa612ab734d748e9dc08f05625c60877"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArSyncTask::setWarningTimeCB </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArRetFunctor.html">ArRetFunctor</a>&lt; unsigned int &gt; *&#160;</td>
          <td class="paramname"><em>functor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the functor called to get the cycle warning time (should only be used from the robot) </p>
<p>This sets a functor which will be called to find the time on the task such that if it takes longer than this number of ms to run a warning message will be issued, sets this on the children too. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArSyncTask.h</li>
<li>ArSyncTask.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArSyncTask.html">ArSyncTask</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
